#ifndef __GTWINDOW_H__
#define __GTWINDOW_H__

#include "GMath.h"
#include <string.h>
#include <stdio.h>

#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include "support.h"
#include "GWindow.h"

enum E_WindowDisplayState
{
	E_HIDE,
	E_NORMAL,
	E_SHOW,
};


class CGTWindow : public CGWindow
{
public:
	GtkWidget *m_pFixed;
	bool m_bEnabled;

	GtkWidget *window;
	GdkPixbuf *pixbuf;
	GdkBitmap *bitmap;
	GdkPixmap *pixmap;


protected:
	float m_fAlpha;
	float m_fElaspedTime;
	E_WindowDisplayState m_eDState;
public:
	CGTWindow(){
		m_pFixed = NULL;
		m_bEnabled = true;
		window = NULL;
		pixbuf = NULL;
		bitmap = NULL;
		pixmap = NULL;
		m_fAlpha = 1.0f;
		m_fElaspedTime  = 0.0f;
		m_eDState = E_NORMAL;
	}
	virtual ~CGTWindow(){}

	virtual void show();
	virtual void hide();
	virtual void create( const char* bg_file = NULL );
	virtual void setPosition( int x, int y);
	virtual void setSize( int x, int y);

	virtual CGPoint getPosition();
	virtual CGPoint size();
	virtual void advanceTime( float fElaspedTime );
	virtual bool isPari( GtkWidget *_pGw);

	virtual void enabled();
	virtual void disable();
	virtual void updateLanguage();

	virtual void showEX();
	virtual void hideEX();

	virtual void setAlpha( float fAlpha );
protected:
	void _updateShow( float fElaspedTime );
	void _updateHide( float fElaspedTime );

};



#endif//__GTWINDOW_H__

